/**
 * Created by IntelliJ IDEA.
 * User: shenry
 * Date: Apr 25, 2008
 * Time: 3:40:43 PM
 * To change this template use File | Settings | File Templates.
 */
class Positione {

    static belongsTo = [ event: Event]
    static hasMany = [registrations: PositionRegistration]
    String name
    String description
    int requiredVolunteers

    def numUnfilledposition={

             return requiredVolunteers.intValue()-registrations.size ()
    }
    
    static mapping = {
        table("event_position")
    }
}